package com.imcode;

import java.io.Serializable;

public class Student implements Serializable {
    private static final long serialVersionUID = -2850530964342014708L;

    private String name;
    private String sex;
    // 序列化的时候年龄不写入文件
    private transient int age;
    // 学生的老师是
    private Teacher teacher;


    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
